<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:s="http://jboss.com/products/seam/taglib">
<head>
	<style>
		.menulink {
			color: #FFFFFF;
			text-decoration:none;
		}
		.menulink:hover {
			color: #000000;
		}
		
		form {
			padding: 0;
			margin: 0;
		}
	</style>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title><ui:insert name="title">Lista Supermercado</ui:insert></title>
</head>
<body>

<div id="document">
	<div id="header">
		<h2>Lista Supermercado</h2>
	</div>
	<div id="menu">
		<h:form>
        <rich:toolBar>
            <rich:dropDownMenu>
                <f:facet name="label"> 
	                <s:link value="Página Inicial" action="/index.xhtml" styleClass="menulink" propagation="none" />
	            </f:facet>
            </rich:dropDownMenu>
            <rich:dropDownMenu>
                <f:facet name="label"> 
	                <s:link value="Supermercados" action="/supermercado/list.xhtml" styleClass="menulink" propagation="none" />
	            </f:facet>
            </rich:dropDownMenu>
            <rich:dropDownMenu>
                <f:facet name="label"> 
	                <s:link value="Produtos" action="/produto/list.xhtml" styleClass="menulink" propagation="none" />
	            </f:facet>
            </rich:dropDownMenu>
            <rich:dropDownMenu>
                <f:facet name="label">
                	<h:outputText id="menuCompras" value="Compras" /> 
	            </f:facet>
                <rich:menuItem>
	                <s:link value="Cadastrar" action="/compras/create.xhtml" propagation="none" />
                </rich:menuItem>
                <rich:menuItem>
	                <s:link value="Listar" action="/compras/list.xhtml" propagation="none" />
                </rich:menuItem>
            </rich:dropDownMenu>
		</rich:toolBar>
		</h:form>
		<br />
	</div>
	<div id="content">
		<ui:insert name="content"/>
	</div>
	<div id="footer">
		<h:form>
	    	<h:commandButton value="logout" action="#{identity.logout}" rendered="#{identity.loggedIn}"/>
		</h:form>
		<ui:insert name="footer"></ui:insert>
	</div>
</div>
</body>
</html>
